﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Cotrobaie
{
    public partial class Home : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Master.FindControl("menu").Visible = false ;
            Panel pp = (Panel)this.Master.FindControl("Panel1");
            pp.Style.Add("position", "relative");
            pp.Style.Add("top", "-150px");
            ImageButton1.Attributes.Add("onMouseOut", "this.src='/images/menuroz.png'");
            ImageButton1.Attributes.Add("onMouseOver", "this.src='/images/omenuroz.png'");
            ImageButton2.Attributes.Add("onMouseOut", "this.src='/images/menugri.png'");
            ImageButton2.Attributes.Add("onMouseOver", "this.src='/images/omenugri.png'");
            ImageButton3.Attributes.Add("onMouseOut", "this.src='/images/menuorange.png'");
            ImageButton3.Attributes.Add("onMouseOver", "this.src='/images/omenuorange.png'");
            ImageButton4.Attributes.Add("onMouseOut", "this.src='/images/menuverde.png'");
            ImageButton4.Attributes.Add("onMouseOver", "this.src='/images/omenuverde.png'");
        }

        protected void showSubsc(object sender, EventArgs e)
        {
            if (Session["UserID"] == null)
            {
                Image1.ImageUrl = "~/images/bulinafirst3.png";
            }
            else
            {
                Response.Redirect("~/Subscriptions.aspx");
            }
        }

        protected void showBooks(object sender, EventArgs e)
        {
            if (Session["UserID"] == null)
            {
                Image1.ImageUrl = "~/images/bulinafirst2.png";
            }
            else
            {
                Response.Redirect("~/Bookmarks.aspx");
            }
        }

        protected void showStats(object sender, EventArgs e)
        {
            Image1.ImageUrl = "~/images/bulinafirst1.png";
        }


        protected void goHome(object sender, EventArgs e)
        {
                Response.Redirect("~/Home.aspx");
        }

        protected void showProducts(object sender, EventArgs e)
        {
            Response.Redirect("~/ExploreProducts.aspx");
        }
        
    }
}